<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "posts".
 *
 * @property string $post_id
 * @property string $post_title
 * @property int $create_at
 * @property int $update_at
 * @property string $author
 * @property int $category_id
 * @property int $post_status
 */
class Posts extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'posts';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['create_at', 'update_at', 'category_id', 'post_status'], 'integer'],
            [['post_title'], 'string', 'max' => 255],
            [['author'], 'string', 'max' => 64],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'post_id' => 'Post ID',
            'post_title' => 'Post Title',
            'create_at' => 'Create At',
            'update_at' => 'Update At',
            'author' => 'Author',
            'category_id' => 'Category ID',
            'post_status' => 'Post Status',
        ];
    }
}
